home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume6 / conquer4 / part13 < prev    next >
Encoding:
Internet Message Format  |  1989-07-06  |  54.9 KB

  1. Path: uunet!husc6!bloom-beacon!mit-eddie!uw-beaver!tektronix!tekgen!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v06i095:  conquer4 - middle earth multi-player game (V4), Part13/14
  5. Message-ID: <4153@tekred.CNA.TEK.COM>
  6. Date: 24 Jun 89 16:37:30 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 1597
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: adb@bu-it.bu.edu (Adam Bryant)
  12. Posting-number: Volume 6, Issue 95
  13. Archive-name: conquer4/Part13
  14. Superseeds: conquer3; Volume 4, Issue 42-49
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 13 (of 14)."
  25. # Contents:  data.c forms.c header.h txt0
  26. # Wrapped by billr@saab on Thu Jun 15 15:20:22 1989
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'data.c' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'data.c'\"
  30. else
  31. echo shar: Extracting \"'data.c'\" \(8567 characters\)
  32. sed "s/^X//" >'data.c' <<'END_OF_FILE'
  33. X/*conquer : Copyright (c) 1988 by Ed Barlow.
  34. X *  I spent a long time writing this code & I hope that you respect this.
  35. X *  I give permission to alter the code, but not to copy or redistribute
  36. X *  it without my explicit permission.  If you alter the code,
  37. X *  please document changes and send me a copy, so all can have it.
  38. X *  This code, to the best of my knowledge works well,  but it is my first
  39. X *  'C' program and should be treated as such.  I disclaim any
  40. X *  responsibility for the codes actions (use at your own risk).  I guess
  41. X *  I am saying "Happy gaming", and am trying not to get sued in the process.
  42. X *                                                Ed
  43. X */
  44. X
  45. X#include "header.h"
  46. X#include "data.h"
  47. X
  48. X/* ele is display characters */
  49. Xchar *ele=       "~#^%-0";
  50. X
  51. X/* Movement costs for varying types of terain by race - '/'=error */
  52. Xchar *HElecost=  "//521/";
  53. Xchar *OElecost=  "//222/";
  54. Xchar *EElecost=  "//631/";
  55. Xchar *DElecost=  "//311/";
  56. Xchar *FElecost=  "16211/";    /* flight costs */
  57. X
  58. X/* BELOW ARE MOVEMENT COSTS FOR VEG */
  59. Xchar *veg=       "vdtblgwfjsi~0";
  60. Xchar *HVegcost=  "63210001332//";    /* Human */
  61. Xchar *OVegcost=  "43100022527//";    /* Orcs  */
  62. Xchar *EVegcost=  "86221000027//";    /* Elves */
  63. Xchar *DVegcost=  "47100013577//";    /* Dwarves */
  64. Xchar *FVegcost=  "410000001000/";    /* Flight */
  65. Xchar *vegfood=   "0004697400000";    /* food value given veg */
  66. X
  67. Xchar *des=       "tcmfx$!&sC?lb+*g=u-P0";
  68. X#ifdef CONQUER
  69. Xchar *elename[]= {  "WATER","PEAK", "MOUNTAIN", "HILL", "FLAT","ERROR"};
  70. Xchar *vegname[]= { "VOLCANO", "DESERT", "TUNDRA", "BARREN", "LT VEG",
  71. X"GOOD", "WOOD", "FOREST", "JUNGLE", "SWAMP", "ICE", "NONE"};
  72. Xchar *desname[]= {"TOWN", "CITY", "MINE", "FARM", "DEVASTATED", "GOLDMINE",
  73. X"FORT","RUIN","STOCKADE","CAPITOL","SPECIAL","LUMBERYD","BLKSMITH","ROAD",
  74. X"MILL","GRANARY","CHURCH","UNIVERSITY","NODESIG","BASE CAMP","ERROR"};
  75. Xchar *races[]= { "GOD","ORC","ELF","DWARF","LIZARD",
  76. X"HUMAN","PIRATE","SAVAGE","NOMAD","UNKNOWN"};
  77. Xchar *diploname[]= { "UNMET", "TREATY", "ALLIED", "FRIENDLY",
  78. X"NEUTRAL", "HOSTILE", "WAR", "JIHAD"};
  79. Xchar *soldname[]= { "?","MARCH","SCOUT","GARRISON","TRADED","MILITIA",
  80. X    "FLYING","DEFEND","MAG_DEF","ATTACK","MAG_ATT","GENERAL","SORTIE",
  81. X    "SIEGE","BESIEGED","ON_BOARD","RULE"};
  82. X#endif CONQUER
  83. X
  84. Xchar *directions[]= { "here", "north", "northeast", "east", "southeast",
  85. X    "south", "southwest", "west", "northwest"};
  86. Xchar *Class[]= { "NPC", "king", "emperor", "wizard", "priest", "pirate",
  87. X"trader", "warlord", "demon", "dragon", "shadow"};
  88. Xchar *allignment[]= { "","Good","Neutral","Evil","Other" };
  89. X
  90. Xchar *unittype[]= {
  91. X"Militia", "Goblins", "Orcs", "Infantry", "Sailors", "Marines", "Archers",
  92. X"Uruk-Hai", "Ninjas", "Phalanx", "Olog-Hai", "Legionaries", "Dragoons", "Mercenaries",
  93. X"Trolls", "Elite", "Lt_Cavalry", "Hv_Cavalry", "Catapults", "Siege", "Rocs",
  94. X"Knights", "Gryfins","Elephants","Zombies","Spy","Scout",
  95. X"King","Baron","Emperor","Prince","Wizard","Mage",
  96. X"Pope","Bishop","Admiral","Captain","Warlord","Lord",
  97. X"Demon","Devil","Dragon","Wyrm","Shadow","Nazgul",
  98. X"Spirit", "Assasin", "Efreet", "Gargoyle", "Wraith",
  99. X"Hero", "Centaur", "Giant", "Superhero", "Mummy",
  100. X"Elemental", "Minotaur", "Demon", "Balrog", "Dragon"
  101. X};
  102. X
  103. X#ifdef CONQUER
  104. X/*short unit types...for printing in upper right corner*/
  105. Xchar *shunittype[]= {
  106. X"mlta", "Gob", "Orc", "Inf", "Sail", "XMar", "Arch",
  107. X"Uruk", "Ninj", "Phax", "olog", "Legn", "Drag", "Merc",
  108. X"Trol", "Elt", "lCav", "hCav", "cat", "sge", "Roc",
  109. X"Kni", "grif","ele","zom","Spy","Scout",
  110. X"King","Bar","Emp","Prin","Wizd","Magi",
  111. X"Apos","Bish","Admi","Capt","Warl","Lord",
  112. X"Demn","Devl","Drag","Wyrm","Shad","Nazg",
  113. X"spir", "Assn", "efr", "Garg", "Wra",
  114. X"Hero", "Cent", "gt", "Shro", "Mumm",
  115. X"Elem", "mino", "dem", "Bal", "Drag"
  116. X};
  117. X#endif CONQUER
  118. Xint unitminsth[]=        /* min strength of a unit */
  119. X{
  120. X1, 1, 1, 1, 1, 1, 1,
  121. X1, 1, 1, 1, 1, 1, 1,
  122. X1, 1, 1, 1, 1, 1, 1,
  123. X1, 1, 1, 1, 1, 1,
  124. X100,50,100,50,250,50,
  125. X100,50,100,50,250,125,
  126. X250,50,500,100,250,125,
  127. X50, 50, 50, 75, 75,
  128. X100, 50, 150, 150, 150,
  129. X175, 150, 500, 500, 1000
  130. X};
  131. X
  132. Xint unitattack[]=
  133. X{ -40, -15,   0,   0,   0,  5,   0,
  134. X5,  20,  10,  15,  20,  10,  0,
  135. X25,  20,  20,  30, -20, -20,  20,
  136. X40,  40, 50, -15, -30, -30,
  137. X30,20,30,20,30,20,
  138. X30,20,30,20,30,30,
  139. X50,20,50,40,50,40,
  140. X0, 20, 10, 10, 10,
  141. X0, 10, 0, 15, 15,
  142. X5, 20, 50, 40, 50
  143. X};
  144. Xint unitdefend[]=
  145. X{
  146. X-25, -15,   0,   0,   0,  0,  10,
  147. X5,   0,  10,  15,  20,  10,  0,
  148. X15,  20,  20,  30,  20,  20,  30,
  149. X40,  50, 50, -15, -30, -30,
  150. X30,20,30,20,30,20,
  151. X30,20,30,20,30,30,
  152. X50,20,50,40,50,40,
  153. X0, 20, 10, 10, 10,
  154. X0, 10, 0, 15, 15,
  155. X5, 20, 50, 40, 50
  156. X};
  157. X/*ten times the move rate of a unit*/
  158. Xint unitmove[]=
  159. X{
  160. X 0, 10, 10, 10, 0, 0, 10,
  161. X10, 10, 10, 10, 10, 20, 10,
  162. X10, 13, 20, 20, 5, 5, 10,
  163. X20, 15, 5, 10, 10, 20,
  164. X20,20,20,20,20,20,
  165. X20,20,20,20,20,20,
  166. X20,20,20,20,20,20,
  167. X10, 10, 15, 10, 10,
  168. X10, 15, 10, 10, 10,
  169. X15, 10, 10, 15, 20
  170. X};
  171. X/*metal cost of a unit*/
  172. Xint u_enmetal[]=
  173. X{
  174. X  0,  80,  80, 100, 100, 100, 100,
  175. X150, 150, 150, 150, 150, 100,   0,
  176. X200, 200, 100, 300,1000,1000, 300,
  177. X600, 400, 600, 100, 0, 0,
  178. X0,0,0,0,0,0,
  179. X0,0,0,0,0,0,
  180. X0,0,0,0,0,0,
  181. X0, 0, 0, 0, 0,
  182. X0, 0, 0, 0, 0,
  183. X0, 0, 0, 0, 0
  184. X};
  185. X/*enlist cost for a unit*/
  186. Xint u_encost[]=
  187. X{
  188. X  50,  70, 85, 100, 100, 100, 100,    /* gold cost for enlistment */
  189. X 125, 125, 150, 180, 180, 300, 225,
  190. X 225, 225, 300, 450, 600, 600, 600,
  191. X 600, 800, 600, 100, 10000, 100,
  192. X0,0,0,0,0,0,
  193. X0,0,0,0,0,0,
  194. X0,0,0,0,0,0,
  195. X2, 2, 2, 2, 2,            /* spell points for enlistment */
  196. X2, 2, 5, 5, 5,
  197. X5, 5,10,10,15
  198. X};
  199. X/*maintenance cost for a unit*/
  200. Xint unitmaint[]= {
  201. X 20,  20,  50,  50,  50,  50,  50,
  202. X 50,  50,  50,  75,  75, 200, 100,
  203. X100, 100, 175, 225, 250, 250, 250,
  204. X250, 250, 250, 0, 2000, 100,
  205. X0,0,0,0,0,0,        /* GOLD COST PER EQUIVALENT MAN FOR MONSTERS */
  206. X0,0,0,0,0,0,
  207. X0,0,0,0,0,0,
  208. X1000, 400, 400, 450, 450,     /* JEWELS / TURN COST FOR ENTIRE UNIT */
  209. X200, 200, 2100, 450, 1000,    /* MULTIPLY BY 5 FOR GOLD COST FOR UNIT */
  210. X1900, 2100, 6000, 6000, 10000
  211. X};
  212. X
  213. Xchar    *exefile =  "exec";
  214. Xchar    *datafile = "data";
  215. Xchar    *msgfile =  "mesg";
  216. Xchar    *sortname = "conqsort";
  217. X
  218. X#ifdef ADMIN
  219. Xchar    scenario[NAMELTH+1];
  220. Xchar    *npcsfile = "nations";
  221. X#endif ADMIN
  222. Xchar    *helpfile = "help";
  223. Xchar    *newsfile = "news";
  224. Xchar    *isonfile = "lock";
  225. X#ifdef TRADE
  226. Xchar    *tradefile = "commerce";
  227. X#endif TRADE
  228. X
  229. Xchar    *seasonstr[] = { "Winter", "Spring", "Summer", "Fall" };
  230. X
  231. Xchar    *pwrname[] = {
  232. X"WARRIOR", "CAPTAIN", "WARLORD", "ARCHER", "CAVALRY", "SAPPER",
  233. X"ARMOR", "AVIAN", "MI_MONST", "AV_MONST", "MA_MONST",
  234. X
  235. X"SLAVER", "DERVISH", "HIDDEN", "ARCHITECT", "RELIGION", "MINER",
  236. X"BREEDER", "URBAN", "STEEL", "NINJA", "SAILOR", "DEMOCRACY", "ROADS",
  237. X
  238. X"THE_VOID", "KNOWALL", "DESTROYER", "VAMPIRE",
  239. X"SUMMON", "WYZARD", "SORCERER", "ERROR"
  240. X};
  241. X
  242. Xlong    powers[] = {
  243. X    WARRIOR,    /*MILITARY POWERS => START=0*/
  244. X    CAPTAIN,    /*1*/
  245. X    WARLORD,    /*2*/
  246. X    ARCHER,        /*3*/
  247. X    CAVALRY,    /*4*/
  248. X    SAPPER,        /*5*/
  249. X    ARMOR,        /*6*/
  250. X    AVIAN,        /*7*/
  251. X    MI_MONST,    /*8*/
  252. X    AV_MONST,    /*9*/
  253. X    MA_MONST,    /*10th power; Mil power #11*/
  254. X    SLAVER,        /*CIVILIAN POWERS => START=11*/
  255. X    DERVISH,    /*12*/
  256. X    HIDDEN,        /*13*/
  257. X    ARCHITECT,    /*14*/
  258. X    RELIGION,    /*15*/
  259. X    MINER,        /*16*/
  260. X    BREEDER,    /*17*/
  261. X    URBAN,        /*18*/
  262. X    STEEL,        /*19*/
  263. X    NINJA,        /*20*/
  264. X    SAILOR,        /*21*/
  265. X    DEMOCRACY,    /*22*/
  266. X    ROADS,        /* 13th CIVILIAN POWER (23rd total) */
  267. X    THE_VOID,    /* MAGICAL SKILLS => START=24 */
  268. X    KNOWALL,    /*25*/
  269. X    DESTROYER,    /*26*/
  270. X    VAMPIRE,    /*27*/
  271. X    SUMMON,        /*28*/
  272. X    WYZARD,        /*29*/
  273. X    SORCERER,    /*30th Entry => 31 total powers => End=7*/
  274. X    0
  275. X};
  276. X
  277. XFILE *fnews, *fopen();
  278. Xstruct sprd_sht spread;
  279. X
  280. XFILE    *fm;
  281. Xint    mailok=FALSE;
  282. X
  283. X#ifdef CONQUER
  284. X#ifdef SYSMAIL
  285. Xchar    sysmail[100];
  286. Xint    sys_mail_status;
  287. X#endif SYSMAIL
  288. Xchar conqmail[100];
  289. Xint    conq_mail_status;
  290. X#endif CONQUER
  291. X
  292. X/* trade good value - zeroes in this comment line mark increments of ten*/
  293. X/*              0         0         0         0         0         0 */
  294. X/* a value of x means any designation is possible */
  295. X/*              fwbcwmhpgcfshfrwdpbcpstgponpmldpllpiopshmtpbcltismasspdsgridp*/
  296. Xchar *tg_stype="xffffttttffffffffffftxlxllttuuctcccfffxxtccmmmmmmmm$$$$$$$$$$0";
  297. Xchar *tg_value="13335157911433442331131135734567789123937571111111111111111110";
  298. X
  299. Xchar    *tg_name[] = {
  300. X"furs", "wool", "beer", "cloth", "wine",
  301. X"mules", "horses", "pigeons", "griffons",
  302. X"corn", "fish", "sugar", "honey", "fruit",
  303. X"rice", "wheat", "dairy", "peas", "bread", "cereal",
  304. X"pottery", "salt", "timber", "granite", "pine", "oak", "nails",
  305. X"papyrus","math","library","drama","paper","literature","law","philosophy",
  306. X"irregation", "oxen", "plows",
  307. X"stones",
  308. X"herbs", "medicine",
  309. X"torture", "prison",
  310. X"bronze", "copper", "lead", "tin", "iron","steel", "mithral", "adamantine",
  311. X"spice","silver","pearls","dye","silk","gold","rubys","ivory","diamonds","platinum",
  312. X"none"
  313. X};
  314. END_OF_FILE
  315. if test 8567 -ne `wc -c <'data.c'`; then
  316.     echo shar: \"'data.c'\" unpacked with wrong size!
  317. fi
  318. # end of 'data.c'
  319. fi
  320. if test -f 'forms.c' -a "${1}" != "-c" ; then 
  321.   echo shar: Will not clobber existing file \"'forms.c'\"
  322. else
  323. echo shar: Extracting \"'forms.c'\" \(26241 characters\)
  324. sed "s/^X//" >'forms.c' <<'END_OF_FILE'
  325. X/*conquer : Copyright (c) 1988 by Ed Barlow.
  326. X *  I spent a long time writing this code & I hope that you respect this.
  327. X *  I give permission to alter the code, but not to copy or redistribute
  328. X *  it without my explicit permission.  If you alter the code,
  329. X *  please document changes and send me a copy, so all can have it.
  330. X *  This code, to the best of my knowledge works well,  but it is my first
  331. X *  'C' program and should be treated as such.  I disclaim any
  332. X *  responsibility for the codes actions (use at your own risk).  I guess
  333. X *  I am saying "Happy gaming", and am trying not to get sued in the process.
  334. X *                                                Ed
  335. X */
  336. X
  337. X/*    screen subroutines    */
  338. X
  339. X#include <ctype.h>
  340. X#include "header.h"
  341. X#include "data.h"
  342. X
  343. Xextern FILE    *fexe, *fnews;
  344. Xextern short    country,redraw;
  345. Xextern long    startgold;
  346. X
  347. Xstatic char helplist[MAXHELP][20]={"Commands", "General Info",
  348. X    "Military","Magic","Designations","Other"};
  349. X
  350. X#define RPT_LINES 14
  351. X#define RPT_COLS 13
  352. X#define BUF_LINES 10
  353. X#define BUF_COLS 15
  354. X#define MAXINROW ((COLS-BUF_COLS)/RPT_COLS)
  355. X#define MAXINSCR (((LINES-BUF_LINES)/RPT_LINES)*MAXINROW)
  356. Xvoid
  357. Xshowscore()
  358. X{
  359. X    int i;
  360. X    int done=FALSE;
  361. X    int xpos,ypos;
  362. X    int count,count2;   /*number of time through the loop on this screen*/
  363. X    int nationid;          /*current nation id */
  364. X
  365. X    count2=1;
  366. X    while(done==FALSE) {
  367. X        clear();
  368. X        standout();
  369. X        mvaddstr(0,(COLS/2)-10,"NATION SCORE SCREEN");
  370. X        standend();
  371. X
  372. X        nationid=count2;
  373. X        xpos=BUF_COLS;
  374. X        ypos=3;
  375. X        count=0;
  376. X        while((nationid<NTOTAL)&&(count<MAXINSCR)){
  377. X            if((nationid<NTOTAL)
  378. X            &&(isntn(ntn[nationid].active))) {
  379. X                if (count%MAXINROW==0) {
  380. X                    /* display header information */
  381. X                    mvaddstr(ypos,0,"nationid is:");
  382. X                    mvaddstr(ypos+1,0,"name is:");
  383. X                    mvaddstr(ypos+2,0,"leader:");
  384. X                    mvaddstr(ypos+3,0,"race:");
  385. X                    mvaddstr(ypos+4,0,"class:");
  386. X                    mvaddstr(ypos+5,0,"alignment:");
  387. X                    mvaddstr(ypos+6,0,"score:");
  388. X                    mvaddstr(ypos+7,0,"talons:");
  389. X                    mvaddstr(ypos+8,0,"military:");
  390. X                    mvaddstr(ypos+9,0,"civilians:");
  391. X                    mvaddstr(ypos+10,0,"sectors:");
  392. X                    mvaddstr(ypos+11,0,"npc nation:");
  393. X                }
  394. X
  395. X                /* display nation information */
  396. X                mvprintw(ypos,xpos,"%d",nationid);
  397. X                standout();
  398. X                mvprintw(ypos+1,xpos,"%s",ntn[nationid].name);
  399. X                standend();
  400. X                mvprintw(ypos+2,xpos,"%s",ntn[nationid].leader);
  401. X                for(i=1;i<8;i++)
  402. X                    if(ntn[nationid].race==*(races+i)[0])
  403. X                        mvprintw(ypos+3,xpos,"%s",*(races+i));
  404. X                mvprintw(ypos+4,xpos,"%s",*(Class+ntn[nationid].class));
  405. X                mvprintw(ypos+5,xpos,"%s",allignment[npctype(ntn[nationid].active)]);
  406. X                mvprintw(ypos+6,xpos,"%ld",ntn[nationid].score);
  407. X                mvprintw(ypos+7,xpos,"%ld",ntn[nationid].tgold);
  408. X                mvprintw(ypos+8,xpos,"%ld",ntn[nationid].tmil);
  409. X                mvprintw(ypos+9,xpos,"%ld",ntn[nationid].tciv);
  410. X                mvprintw(ypos+10,xpos,"%d",ntn[nationid].tsctrs);
  411. X                if(isnpc(ntn[nationid].active))
  412. X                    mvprintw(ypos+11,xpos,"Yes");
  413. X                else mvprintw(ypos+11,xpos,"No");
  414. X                count++;
  415. X                if(count<MAXINSCR && count%MAXINROW==0) {
  416. X                    ypos+=RPT_LINES;
  417. X                    xpos=BUF_COLS;
  418. X                } else {
  419. X                    xpos+=RPT_COLS;
  420. X                }
  421. X            }
  422. X            nationid++;
  423. X        }
  424. X        standout();
  425. X        mvaddstr(LINES-6,(COLS/2)-12,"HIT ANY KEY TO CONTINUE");
  426. X        mvaddstr(LINES-5,(COLS/2)-9,"HIT SPACE IF DONE");
  427. X        standend();
  428. X        refresh();
  429. X        if (getch()==' ') done=TRUE;
  430. X        else {
  431. X            /* go to start of next page in list */
  432. X            while(nationid<NTOTAL && !isntn(ntn[nationid].active))
  433. X                nationid++;
  434. X            if(nationid==NTOTAL) count2=1;
  435. X            else count2=nationid;
  436. X        }
  437. X    }
  438. X}
  439. X
  440. X#define    MAXINCOL    (LINES-10)
  441. X#define    MAXONSCR    (MAXINCOL*(COLS/40))
  442. Xvoid
  443. Xdiploscrn()
  444. X{
  445. X    int i,j;
  446. X    char k,name[20];
  447. X    short nation, offset, count, count2, temp;
  448. X    short isgod=FALSE;
  449. X    long    bribecost;
  450. X    if(country==0) {
  451. X        isgod=TRUE;
  452. X        if (get_god()) return;
  453. X    }
  454. X    count2=1;
  455. X    while(1){
  456. X        count=1;
  457. X        offset=0;
  458. X        clear();
  459. X        standout();
  460. X        mvaddstr(0,(COLS/2)-12,"NATION DIPLOMACY SUMMARY");
  461. X        standend();
  462. X        mvaddstr(2,0,"                BY YOU,        TO YOU");
  463. X        for(i=count2;i<NTOTAL && count<MAXONSCR;i++)
  464. X        if((isntnorp(ntn[i].active))&&(i!=country)) {
  465. X            if(count%MAXINCOL==0) {
  466. X                offset+=40;
  467. X                mvaddstr(2,offset,"                BY YOU,        TO YOU");
  468. X                count++;
  469. X            }
  470. X            mvprintw(count%MAXINCOL+2,offset, "%d. %s",i,ntn[i].name);
  471. X            if((curntn->dstatus[i]==WAR)
  472. X            ||(curntn->dstatus[i]==JIHAD)) standout();
  473. X            mvprintw(count%MAXINCOL+2,offset+14, "=> %s",*(diploname+curntn->dstatus[i]));
  474. X            standend();
  475. X            if((ntn[i].dstatus[country]==WAR)
  476. X            ||(ntn[i].dstatus[country]==JIHAD)) standout();
  477. X            mvprintw(count%MAXINCOL+2,offset+28, "=> %s",*(diploname+ntn[i].dstatus[country]));
  478. X            standend();
  479. X            count++;
  480. X        }
  481. X
  482. X        /* display options */
  483. X        standout();
  484. X        mvaddstr(LINES-7,0,"HIT RETURN KEY TO CHANGE STATUS; HIT SPACE IF DONE");
  485. X        mvprintw(LINES-6,0,"HIT 'B' KEY TO BRIBE NPC NATION (cost=$%ld per 1000 Mil.)",BRIBE);
  486. X        mvaddstr(LINES-5,0,"ANY OTHER KEY TO CONTINUE:");
  487. X        standend();
  488. X        refresh();
  489. X        k=getch();
  490. X        if(k==' ') {
  491. X            if(isgod==TRUE) reset_god();
  492. X            return;
  493. X        }
  494. X        if((k!='B')&&(k!='\r')&&(k!='\n')) {
  495. X            /* find start for next listing */
  496. X            for(; i<NTOTAL && (!isntnorp(ntn[i].active)||i==country); i++) ;
  497. X            if(i==NTOTAL) count2=1;
  498. X            else count2=i;
  499. X            continue;
  500. X        }
  501. X        if(k=='B'){
  502. X            if(curntn->tgold<=BRIBE){
  503. X                mvaddstr(LINES-3,0,"NOT ENOUGH GOLD");
  504. X                refresh();
  505. X                getch();
  506. X                if(isgod==TRUE) reset_god();
  507. X                return;
  508. X            }
  509. X            mvaddstr(LINES-4,0,"BRIBES DONT ALWAYS WORK (only the update will show)");
  510. X            mvaddstr(LINES-3,0,"WHAT NATION:");
  511. X            refresh();
  512. X            nation = get_country();
  513. X
  514. X            /* may only change with NPCs */
  515. X            if((nation<=0)
  516. X            ||(nation>=NTOTAL)
  517. X            ||(!isnpc(ntn[nation].active))){
  518. X                errormsg("NOT NON PLAYER COUNTRY");
  519. X                if(isgod==TRUE) reset_god();
  520. X                return;
  521. X            }
  522. X            if(ntn[country].dstatus[nation]==UNMET){
  523. X                errormsg("YOU HAVE NOT MET COUNTRY");
  524. X                if(isgod==TRUE) reset_god();
  525. X                return;
  526. X            }
  527. X            if((isgod!=TRUE)
  528. X                &&((ntn[nation].dstatus[country]==ALLIED)
  529. X                ||(ntn[nation].dstatus[country]==JIHAD)
  530. X                ||(ntn[nation].dstatus[country]==UNMET)
  531. X                ||(ntn[nation].dstatus[country]==TREATY))){
  532. X                errormsg("Sorry, you can't bribe them");
  533. X                return;
  534. X            }
  535. X
  536. X            if( isgod==TRUE ) {
  537. X                bribecost = 0;
  538. X            } else if( ntn[nation].tmil > 1000 ) {
  539. X                bribecost = BRIBE * ntn[nation].tmil / 1000;
  540. X            } else    bribecost = BRIBE;
  541. X            mvprintw(LINES-3,0,"This will cost %ld gold talons. continue (y or n)",bribecost);
  542. X            refresh();
  543. X
  544. X            if( getch() != 'y' ) return;
  545. X            if(curntn->tgold<=bribecost){
  546. X                errormsg("Sorry Not Enough Gold");
  547. X                if(isgod==TRUE) reset_god();
  548. X                return;
  549. X            }
  550. X            curntn->tgold-=bribecost;
  551. X
  552. X            sprintf(name,"%s%d",exefile,nation);
  553. X            if ((fm=fopen(name,"a+"))==NULL) {
  554. X                printf("error opening news file\n");
  555. X                exit(FAIL);
  556. X            }
  557. X            BRIBENATION;
  558. X            mailclose();
  559. X
  560. X            ntn[nation].dstatus[country]--;
  561. X
  562. X            if(isgod==TRUE) reset_god();
  563. X            return;
  564. X        }
  565. X        mvaddstr(LINES-3,0,"WHAT NATION:");
  566. X        refresh();
  567. X        nation = get_country();
  568. X        /* can't change with nomads...*/
  569. X        if((nation<=0)||(nation>NTOTAL)||(!isntnorp(ntn[nation].active))){
  570. X            if(isgod==TRUE) reset_god();
  571. X            return;
  572. X        }
  573. X        if((isgod==FALSE)
  574. X            &&(curntn->tgold < BREAKJIHAD )
  575. X            &&(((curntn->dstatus[nation]==TREATY)
  576. X            &&(ntn[nation].dstatus[country]<WAR))
  577. X            ||(curntn->dstatus[nation]==JIHAD))) {
  578. X
  579. X            mvprintw(LINES-1,0,"Sorry, need %d talons to change status with ntn %s",BREAKJIHAD,ntn[nation].name);
  580. X            clrtoeol();
  581. X                mvaddstr(LINES-1, 60, "PRESS ANY KEY");
  582. X            refresh();
  583. X            getch();
  584. X            if(isgod==TRUE) reset_god();
  585. X            return;
  586. X        } else if (isgod==FALSE && curntn->dstatus[nation]==UNMET) {
  587. X            errormsg("Sorry, you have not met that nation yet.");
  588. X            if(isgod==TRUE) reset_god();
  589. X            return;
  590. X        } else {
  591. X            clear();
  592. X            mvaddstr(0,0,"WHAT NEW STATUS");
  593. X            j=2;
  594. X            mvprintw(j++,0,"1) TREATY (%d talons to break)",BREAKJIHAD);
  595. X            mvaddstr(j++,0,"2) ALLIED");
  596. X            mvaddstr(j++,0,"3) FRIENDLY");
  597. X            mvaddstr(j++,0,"4) NEUTRAL");
  598. X            mvaddstr(j++,0,"5) HOSTILE");
  599. X            mvaddstr(j++,0,"6) WAR");
  600. X            mvprintw(j++,0,"7) JIHAD (%d talons to break):",BREAKJIHAD);
  601. X            j++;
  602. X            for( i=1; i<=NTOTAL; i++ )
  603. X                if((isntnorp(ntn[i].active)) && (ntn[nation].dstatus[i]==TREATY))
  604. X                mvprintw(j++,10,"%s has treaty with %s",ntn[nation].name,ntn[i].name);
  605. X
  606. X            j++;
  607. X            mvaddstr(j++,0,"INPUT:");
  608. X            refresh();
  609. X            temp = get_number();
  610. X            if((temp<=UNMET)||(temp>JIHAD)
  611. X            ||((isgod==FALSE)&&(temp==UNMET))){
  612. X                mvprintw(23,0,"SORRY, Invalid inputs -- hit return");
  613. X                refresh();
  614. X                getch();
  615. X                if(isgod==TRUE) reset_god();
  616. X                return;
  617. X            }
  618. X
  619. X            if(((curntn->dstatus[nation]==TREATY)&&(temp!=TREATY))
  620. X            ||(( curntn->dstatus[nation]==JIHAD)&&(temp!=JIHAD)))
  621. X                    curntn->tgold -= BREAKJIHAD;
  622. X
  623. X            curntn->dstatus[nation]=temp;
  624. X            EADJDIP(country,nation);
  625. X
  626. X            if((temp>HOSTILE)
  627. X            &&(ispc(ntn[nation].active))
  628. X            &&(ntn[nation].dstatus[country]<WAR)) {
  629. X                mailopen(nation);
  630. X                fprintf(fm,"Message to %s from CONQUER\n",ntn[nation].name);
  631. X                fprintf(fm,"    During the %s of Year %d,\n",PSEASON(TURN),YEAR(TURN));
  632. X                fprintf(fm,"      %s declared war on you\n",curntn->name);
  633. X                mailclose();
  634. X            }
  635. X
  636. X            /*prevent ron from being sneaky*/
  637. X            if((temp>HOSTILE)
  638. X            &&(isactive(ntn[nation].active))
  639. X            &&(ntn[nation].dstatus[country]<WAR)) {
  640. X                ntn[nation].dstatus[country]=WAR;
  641. X                EADJDIP(nation,country);
  642. X                for( i=1; i<=NTOTAL; i++ )
  643. X                if(ntn[i].dstatus[nation]==TREATY){
  644. X                    ntn[i].dstatus[country]=WAR;
  645. X                    EADJDIP(i,country);
  646. X                    mailopen(country);
  647. X                    fprintf(fm,"Message to %s from %s\n",ntn[country].name,ntn[i].name);
  648. X                    switch( rand()%4 ) {
  649. X                    case 0: fprintf(fm,"You just attacked my friend %s - your loss!!!\n",ntn[nation].name);
  650. X                        break;
  651. X                    case 1: fprintf(fm,"Our imperial forces will assist %s!!!\n",ntn[nation].name);
  652. X                        fprintf(fm,"in repulsing your toy armies!!!\n");
  653. X                        break;
  654. X                    case 2: fprintf(fm,"Sucker - your aggression against %s is your doom!!!\n",ntn[nation].name);
  655. X                        break;
  656. X                    case 3: fprintf(fm,"We deplore your aggression against %s and are taking\n",ntn[nation].name);
  657. X                        fprintf(fm,"appropriate counter measures!!! DIE!!!\n");
  658. X                        break;
  659. X                    }
  660. X                    mailclose();
  661. X                }
  662. X            }
  663. X        }
  664. X    }
  665. X}
  666. X
  667. Xint terror_adj=0;
  668. Xvoid
  669. Xchange()
  670. X{
  671. X    float temp;
  672. X    char string[10], command[80];
  673. X    int i, intval;
  674. X    long    cost,men;
  675. X    short armynum;
  676. X    char passwd[PASSLTH+1];
  677. X    short isgod=FALSE;
  678. X    FILE *fp;
  679. X#ifdef OGOD
  680. X    FILE *ftmp;
  681. X#endif OGOD
  682. X    char filename[80];
  683. X
  684. X    if(country==0) {
  685. X        isgod=TRUE;
  686. X        if (get_god()) return;
  687. X    }
  688. X    fp=fopen("temp","w");
  689. X    fprintf(fp,"LINE %d FILE %s\n",__LINE__,__FILE__);
  690. X    clear();
  691. X    standout();
  692. X    mvaddstr(0,(COLS/2)-10,"NATION STATS SUMMARY");
  693. X    mvprintw(3,0,"nation name is %s",curntn->name);
  694. X    mvprintw(4,0,"allignment is %s",allignment[npctype(curntn->active)]);
  695. X    if (isgod==TRUE)
  696. X        mvprintw(5,0,"active is %d",curntn->active);
  697. X    mvprintw(6,0,"tax_rate...... %2d%%",curntn->tax_rate);
  698. X    mvprintw(7,0,"inflation..... %2d%%",curntn->inflation);
  699. X    i=10*curntn->tax_rate-curntn->popularity-curntn->terror-3*curntn->charity;
  700. X    if( i<0 ) i=0;
  701. X    mvprintw(8,0,"peasant revolt %2d%%",(i*PREVOLT)/100);
  702. X    i=5*curntn->tax_rate - curntn->prestige;
  703. X    if( i<0 ) i=0;
  704. X    mvprintw(9,0,"other revolt.. %2d%%",(i*PREVOLT)/100);
  705. X    standend();
  706. X    mvprintw(10,0,"capitol loc: x is %d",curntn->capx);
  707. X    mvprintw(11,0,"             y is %d",curntn->capy);
  708. X    mvprintw(12,0,"leader is %s",curntn->leader);
  709. X    mvprintw(13,0,"class is %s",*(Class+curntn->class));
  710. X    if(ispc( curntn->active ) )
  711. X        addstr(" (PC)");
  712. X    else if(isnpc( curntn->active ) )
  713. X        addstr(" (NPC)");
  714. X    else    addstr(" (MON)");
  715. X    mvprintw(14,0,"nations mark is...%c ",curntn->mark);
  716. X    fprintf(fp,"LINE %d FILE %s\n",__LINE__,__FILE__);
  717. X    for(i=1;i<8;i++) if(curntn->race==*(races+i)[0]){
  718. X        mvprintw(15,0, "nation race is....%s  ",*(races+i));
  719. X        break;
  720. X    }
  721. X
  722. X    fprintf(fp,"LINE %d FILE %s\n",__LINE__,__FILE__);
  723. X    mvprintw(3,COLS/2-12, "terror........ %3d",curntn->terror);
  724. X    mvprintw(4,COLS/2-12, "popularity.... %3d",curntn->popularity);
  725. X    mvprintw(5,COLS/2-12, "prestige...... %3d",curntn->prestige);
  726. X    fprintf(fp,"LINE %d FILE %s\n",__LINE__,__FILE__);
  727. X    fflush( fp );
  728. X    mvprintw(6,COLS/2-12, "knowledge..... %3d",curntn->knowledge);
  729. X    fprintf(fp,"LINE %d FILE %s\n",__LINE__,__FILE__);
  730. X    fflush( fp );
  731. X    temp = P_EATRATE;
  732. X    mvprintw(7,COLS/2-12, "eatrate.......%3.2f",temp);
  733. X    fprintf(fp,"LINE %d FILE %s\n",__LINE__,__FILE__);
  734. X    fflush( fp );
  735. X    mvprintw(8,COLS/2-12, "wealth........ %3d",curntn->wealth);
  736. X    fprintf(fp,"LINE %d FILE %s\n",__LINE__,__FILE__);
  737. X    fflush( fp );
  738. X    mvprintw(9,COLS/2-12,"charity....... %2d%%",curntn->charity);
  739. X    fprintf(fp,"LINE %d FILE %s\n",__LINE__,__FILE__);
  740. X    fflush( fp );
  741. X    mvprintw(10,COLS/2-12,"communication.%3.2f",(float) P_NTNCOM);
  742. X    fprintf(fp,"LINE %d FILE %s\n",__LINE__,__FILE__);
  743. X    mvprintw(11,COLS/2-12,"reputation.... %3d",curntn->reputation);
  744. X    mvprintw(12,COLS/2-12,"spoilrate.....%3d%%",curntn->spoilrate);
  745. X    mvprintw(13,COLS/2-12,"farm ability.. %3d",curntn->farm_ability);
  746. X    mvprintw(14,COLS/2-12,"mine ability.. %3d",curntn->mine_ability);
  747. X    mvprintw(15,COLS/2-12,"poverty rate.. %2d%%",curntn->poverty);
  748. X    fprintf(fp,"LINE %d FILE %s\n",__LINE__,__FILE__);
  749. X    mvprintw(16,COLS/2-12,"power......... %3d",curntn->power);
  750. X    fprintf(fp,"LINE %d FILE %s\n",__LINE__,__FILE__);
  751. X
  752. X    if (country!=0) {
  753. X        mvprintw(16,0,"score currently...%ld",curntn->score);
  754. X        mvprintw(3,COLS-30, "attack bonus.........%+4d%%",curntn->aplus);
  755. X        mvprintw(4,COLS-30, "defense bonus........%+4d%%",curntn->dplus);
  756. X        mvprintw(12,COLS-30,"total soldiers....%8ld",curntn->tmil);
  757. X    } else {
  758. X        mvprintw(16,0,"turn currently....%ld",TURN);
  759. X        mvprintw(3,COLS-30, "mercs attack bonus....+%2d%%",MERCATT);
  760. X        mvprintw(4,COLS-30, "mercs defense bonus...+%2d%%",MERCDEF);
  761. X        mvprintw(12,COLS-30,"total mercs.......%8ld",MERCMEN);
  762. X    }
  763. X    fprintf(fp,"LINE %d FILE %s\n",__LINE__,__FILE__);
  764. X
  765. X      mvprintw(5,COLS-30, "maximum move rate.......%2d",curntn->maxmove);
  766. X      mvprintw(6,COLS-30, "reproduction rate......%2d%%",curntn->repro);
  767. X      mvprintw(8,COLS-30, "gold talons......$%8ld",curntn->tgold);
  768. X
  769. X    mvprintw(9,COLS-30,"jewels ..........$%8ld",curntn->jewels);
  770. X    mvprintw(10,COLS-30,"metal & minerals..%8ld",curntn->metals);
  771. X    fprintf(fp,"LINE %d FILE %s\n",__LINE__,__FILE__);
  772. X    if(curntn->tfood<2*curntn->tciv) standout();
  773. X    mvprintw(11,COLS-30,"food in granary...%8ld",curntn->tfood);
  774. X    standend();
  775. X
  776. X    mvprintw(13,COLS-30,"total civilians...%8ld",curntn->tciv);
  777. X    mvprintw(14,COLS-30,"total ships..........%5d",curntn->tships);
  778. X    mvprintw(15,COLS-30,"total sectors........%5d",curntn->tsctrs);
  779. X    mvprintw(16,COLS-30,"spell points.........%5d",curntn->spellpts);
  780. X
  781. X    standout();
  782. X    mvaddstr(LINES-6,COLS/2-26,"HIT 'B' FOR BUDGET SCREEN, 'P' FOR PRODUCTION SCREEN");
  783. X    mvaddstr(LINES-5,COLS/2-25,"1) NAME 2) PASSWD 3) TAX RATE 4) CHARITY 5) TERROR");
  784. X    if(magic(country,VAMPIRE)!=1)
  785. X        mvaddstr(LINES-4,COLS/2-21,"6) ADD TO COMBAT BONUS");
  786. X    else    mvaddstr(LINES-4,COLS/2-22,"CANT ADD TO COMBAT BONUS");
  787. X    addstr(" 7) TOGGLE PC <-> NPC");
  788. X
  789. X#ifdef OGOD
  790. X     if(isgod==TRUE) mvaddstr(LINES-3,COLS/2-24,"HIT 8 TO DESTROY NATION OR 9 TO CHANGE COMMODITY");
  791. X#else OGOD
  792. X      if(isgod==TRUE) mvaddstr(LINES-3,COLS/2-11,"HIT 8 TO DESTROY NATION");
  793. X#endif OGOD
  794. X    else mvaddstr(LINES-3,COLS/2-14,"HIT ANY OTHER KEY TO CONTINUE");
  795. X    standend();
  796. X    refresh();
  797. X    switch(getch()){
  798. X    case '1': /*get name*/
  799. X        clear();
  800. X        mvaddstr(0,0,"what name would you like:");
  801. X        clrtoeol();
  802. X        refresh();
  803. X        get_nname(string);
  804. X        if((strlen(string)<=1)||(strlen(string)>NAMELTH)){
  805. X            errormsg("invalid name");
  806. X            if(isgod==TRUE) reset_god();
  807. X            return;
  808. X        }
  809. X        /*check if already used*/
  810. X        else for(i=1;i<(country-1);i++){
  811. X            if((strcmp(ntn[i].name,string)==0)&&(i!=country)) {
  812. X                errormsg("name already used");
  813. X                if(isgod==TRUE) reset_god();
  814. X                fclose(fp); return;
  815. X            }
  816. X        }
  817. X        errormsg("new name can be used following next update");
  818. X        strcpy(curntn->name,string);
  819. X        ECHGNAME;
  820. X        break;
  821. X    case '2': /*change password */
  822. X        clear();
  823. X        if(isgod!=TRUE){
  824. X            mvaddstr(0,0,"what is your current password:");
  825. X            refresh();
  826. X            gets(command);
  827. X            strncpy(passwd,crypt(command,SALT),PASSLTH);
  828. X            if((strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)
  829. X                &&(strncmp(passwd,curntn->passwd,PASSLTH)!=0)){
  830. X                errormsg("invalid password");
  831. X                fclose(fp); return;
  832. X            }
  833. X        }
  834. X        mvaddstr(2,0,"what is your new password:");
  835. X        refresh();
  836. X        gets(command);
  837. X        if((strlen(command)>PASSLTH)||(strlen(command)<2)) {
  838. X            errormsg("invalid new password");
  839. X            if(isgod==TRUE) reset_god();
  840. X            fclose(fp); return;
  841. X        }
  842. X        strncpy(passwd,command,PASSLTH);
  843. X        mvaddstr(4,0,"reenter your new password:");
  844. X        refresh();
  845. X        gets(command);
  846. X        if(strncmp(passwd,command,PASSLTH)!=0) {
  847. X            if(isgod==TRUE) reset_god();
  848. X            fclose(fp); return;
  849. X        }
  850. X        errormsg("new password can be used following next update");
  851. X        strncpy(curntn->passwd,crypt(command,SALT),PASSLTH);
  852. X        ECHGPAS;
  853. X        break;
  854. X    case '3': /* change tax rate */
  855. X        standout();
  856. X        mvaddstr(LINES-1,0,"WHAT TAX RATE DO YOU WISH:");
  857. X        standend();
  858. X        refresh();
  859. X        intval = get_number();
  860. X        if( intval < 0 )
  861. X            errormsg("ERROR - negative tax rate");
  862. X        else if( intval > 20 )
  863. X            errormsg("NO WAY! the peasants will revolt!!!");
  864. X        else if( intval > 10 && (curntn->tsctrs<20 || curntn->score<20) )
  865. X            errormsg("Sorry, you may not go above 10% yet");
  866. X        else {
  867. X            curntn->tax_rate = (unsigned char) intval;
  868. X            NADJNTN;
  869. X        }
  870. X        break;
  871. X    case '4':    /* charity */
  872. X        standout();
  873. X        mvaddstr(LINES-1,0,"GIVE WHAT PERCENT OF YOUR INCOME TO THE POOR:");
  874. X        standend();
  875. X        refresh();
  876. X        intval = get_number();
  877. X        if(( intval < 0 ) ||( intval > 100 ))
  878. X            errormsg("ERROR - invalid charity rate");
  879. X        /* this will protect from both underflow and overflow */
  880. X        else if((int)curntn->popularity + 2*(intval - (int)curntn->charity)>100)
  881. X            errormsg("ERROR - you may not increase charity that much");
  882. X        else if((int)curntn->popularity + 2*(intval - (int)curntn->charity)<0)
  883. X            errormsg("ERROR - you may not decrease charity that much");
  884. X        else {
  885. X            curntn->popularity += (unsigned char) 2*(intval - (int) curntn->charity);
  886. X            curntn->charity = intval;
  887. X            NADJNTN;
  888. X        }
  889. X        break;
  890. X    case '5':    /* terror */
  891. X        mvaddstr(LINES-2,0,"YOU CAN TERRORIZE YOUR PEOPLE AN ADDITONAL 1-5%:");
  892. X        standout();
  893. X        mvaddstr(LINES-1,0,"HOW MUCH MORE TO TERRORIZE THEM: ");
  894. X        standend();
  895. X        refresh();
  896. X        intval = get_number();
  897. X        if( intval < 0 )
  898. X            errormsg("ERROR - negative input");
  899. X        else if( intval+curntn->terror > 100 )
  900. X            errormsg("Cant go over 100 terror!!!");
  901. X        else if((intval > curntn->popularity )
  902. X        || (intval > curntn->reputation ))
  903. X            errormsg("Sorry - this would cause underflow");
  904. X        else if(intval>5) {
  905. X            errormsg("That is over the allowed 5%");
  906. X        } else if(terror_adj>0) {
  907. X            errormsg("Terror may only be adjusted once per turn");
  908. X        } else if(intval>0) {
  909. X            terror_adj++;
  910. X            curntn->terror += (unsigned char) intval;
  911. X            curntn->popularity -= (unsigned char) intval;
  912. X            curntn->reputation -= (unsigned char) (intval+1)/2;
  913. X            NADJNTN2;
  914. X        }
  915. X        break;
  916. X    case '6':    /* combat bonus */
  917. X        if(magic(country,VAMPIRE)==1) {
  918. X            errormsg("VAMPIRES CAN'T ADD TO COMBAT BONUS");
  919. X            break;
  920. X        }
  921. X        if(magic(country,WARLORD)==1)      intval=30;
  922. X        else if(magic(country,CAPTAIN)==1) intval=20;
  923. X        else if(magic(country,WARRIOR)==1) intval=10;
  924. X        else intval=0;
  925. X        men=0;
  926. X        for(armynum=0;armynum<MAXARM;armynum++)
  927. X            if((P_ASOLD>0)&&(P_ATYPE<MINLEADER)) men+=P_ASOLD;
  928. X        men = max( men, 1500);
  929. X        armynum = max( curntn->aplus-intval, 10 );
  930. X        cost = METALORE*men*armynum*armynum/100;
  931. X        if( curntn->race == ORC) cost*=3;
  932. X        mvprintw(LINES-1,0,"Do You Wish Spend %ld Metal On Attack (enter y or n):",cost);
  933. X        refresh();
  934. X        if(getch()=='y'){
  935. X            if(curntn->metals> cost){
  936. X                curntn->aplus+=1;
  937. X                I_APLUS;
  938. X                curntn->metals-=cost;
  939. X            } else {
  940. X                errormsg("SORRY");
  941. X            }
  942. X        }
  943. X        armynum = max( curntn->dplus-intval, 10 ) / 10;
  944. X        cost=METALORE*men*armynum*armynum;
  945. X        if( curntn->race == ORC) cost*=3;
  946. X        mvprintw(LINES-1,0,"Do You Wish Spend %ld Metal On Defense (enter y or n):",cost);
  947. X        refresh();
  948. X        if(getch()=='y'){
  949. X            if(curntn->metals>cost){
  950. X                curntn->dplus+=1;
  951. X                I_DPLUS;
  952. X                curntn->metals-=cost;
  953. X            } else {
  954. X                errormsg("SORRY");
  955. X            }
  956. X        }
  957. X        break;
  958. X    case '7':
  959. X        if( startgold != curntn->tgold ) {
  960. X            errormsg("Sorry: you have already made some moves this turn!");
  961. X            break;
  962. X        } else if(ispc(curntn->active)) {
  963. X            errormsg("Note: you get no mail while playing as an NPC!");
  964. X            curntn->active *= 4;
  965. X        } else if(isnpc(curntn->active))
  966. X            curntn->active /= 4;
  967. X        NADJNTN;
  968. X        break;
  969. X    case '8':
  970. X        if(isgod==TRUE){
  971. X            clear();
  972. X            mvaddstr(LINES-1,0,"DO YOU WANT TO DESTROY THIS NATION (y or n)");
  973. X            refresh();
  974. X
  975. X            if(getch()=='y') {
  976. X                /* save to last turns news file */
  977. X                sprintf(filename,"%s%d",newsfile,TURN-1);
  978. X                if ((fnews=fopen(filename,"a+"))==NULL) {
  979. X                    printf("error opening news file\n");
  980. X                    exit(FAIL);
  981. X                }
  982. X                destroy(country);
  983. X                fclose(fnews);
  984. X                sprintf(command,"%s/%s",DEFAULTDIR, sortname);
  985. X                sprintf(command,"%s %s %s", command, filename, filename);
  986. X                system(command);
  987. X            }
  988. X        }
  989. X        break;
  990. X#ifdef OGOD
  991. X    case '9':
  992. X        if (isgod==TRUE) {
  993. X            /* open the target country's files */
  994. X            sprintf(filename,"%s%d",exefile,country);
  995. X            if ((ftmp=fopen(filename,"a"))==NULL) {
  996. X                beep();
  997. X                errormsg("error opening country's file");
  998. X                reset_god();
  999. X                fclose(fp); return;
  1000. X            }
  1001. X            /* adjust commodities */
  1002. X            mvaddstr(LINES-2,0,"CHANGE: 1) Gold 2) Jewels 3) Iron 4) Food ?");
  1003. X            clrtoeol();
  1004. X            refresh();
  1005. X            switch(getch()) {
  1006. X            case '1':
  1007. X                mvaddstr(LINES-1,0,"WHAT IS NEW VALUE FOR TREASURY? ");
  1008. X                refresh();
  1009. X                curntn->tgold = (long) get_number();
  1010. X                fprintf(ftmp,"L_NGOLD\t%d \t%d \t%ld \t0 \t0 \t%s\n", XNAGOLD ,country,curntn->tgold,"null");
  1011. X                break;
  1012. X            case '2':
  1013. X                mvaddstr(LINES-1,0,"WHAT IS NEW AMOUNT OF JEWELS? ");
  1014. X                refresh();
  1015. X                curntn->jewels = (long) get_number();
  1016. X                fprintf(ftmp,"L_NJWLS\t%d \t%d \t%ld \t0 \t0 \t%s\n", XNARGOLD ,country,curntn->jewels,"null");
  1017. X                break;
  1018. X            case '3':
  1019. X                mvaddstr(LINES-1,0,"WHAT IS NEW AMOUNT OF METAL? ");
  1020. X                refresh();
  1021. X                curntn->metals = (long) get_number();
  1022. X                fprintf(ftmp,"L_NMETAL\t%d \t%d \t%ld \t0 \t0 \t%s\n", XNAMETAL ,country,curntn->metals,"null");
  1023. X                break;
  1024. X            case '4':
  1025. X                mvaddstr(LINES-1,0,"WHAT IS NEW AMOUNT OF FOOD? ");
  1026. X                refresh();
  1027. X                curntn->tfood = (long) get_number();
  1028. X                break;
  1029. X            default:
  1030. X                break;
  1031. X            }
  1032. X            fclose(ftmp);
  1033. X        }
  1034. X        break;
  1035. X#endif OGOD
  1036. X    case 'p':
  1037. X    case 'P': produce(); fclose(fp); return;
  1038. X    case 'b':
  1039. X    case 'B': budget(); fclose(fp); return;
  1040. X    default:
  1041. X        if(isgod==TRUE) reset_god();
  1042. X        fclose(fp);
  1043. X        return;
  1044. X    }
  1045. X    if(isgod==TRUE) reset_god();
  1046. X    fclose(fp);
  1047. X    change();
  1048. X}
  1049. X
  1050. Xvoid
  1051. Xhelp()
  1052. X{
  1053. X    int lineno;
  1054. X    FILE *fp, *fopen();
  1055. X    int i,xcnt,ycnt,done=FALSE;
  1056. X    char line[80],fname[80];
  1057. X
  1058. X    /*find out which helpfile to read in */
  1059. X    clear_bottom(0);
  1060. X    ycnt = LINES - 3;
  1061. X    xcnt = 0;
  1062. X    mvaddstr(LINES-4,0,"Help on which topic:");
  1063. X    for (i=0;i<MAXHELP;i++) {
  1064. X        sprintf(line,"  %d) %s",i,helplist[i]);
  1065. X        mvaddstr(ycnt,xcnt,line);
  1066. X        xcnt += 20;
  1067. X        if (i==2) {
  1068. X            xcnt = 0;
  1069. X            ycnt ++;
  1070. X        }
  1071. X    }
  1072. X    refresh();
  1073. X    i = getch()-'0';
  1074. X
  1075. X    /* quick exit on invalid entry */
  1076. X    if (i<0 || i>MAXHELP) {
  1077. X        redraw=FALSE;
  1078. X        makebottom();
  1079. X        return;
  1080. X    }
  1081. X
  1082. X    /*open help file*/
  1083. X    sprintf(fname,"%s/%s%d",DEFAULTDIR,helpfile,i);
  1084. X    if ((fp=fopen(fname,"r"))==NULL) {
  1085. X        mvprintw(0,0,"\nerror on read of %s\n",fname);
  1086. X        refresh();
  1087. X        getch();
  1088. X        return;
  1089. X    }
  1090. X
  1091. X    while(done==FALSE){
  1092. X        /*read in screen (until DONE statement)*/
  1093. X        fgets(line,80,fp);
  1094. X        if(strncmp(line,"DONE",4)==0) done=TRUE;
  1095. X        else {
  1096. X            clear();
  1097. X            lineno=0;
  1098. X            while(strncmp(line,"END",3)!=0) {
  1099. X                if(lineno==0) {
  1100. X                    /* highlight topic line */
  1101. X                    for(i=0;line[i]==' ';i++) ;
  1102. X                    i--;          /* back up 1 */
  1103. X                    standout();
  1104. X                    mvaddstr(lineno,i,line+i);
  1105. X                    /* add a blank space on the end */
  1106. X                    mvaddch(lineno,strlen(line)-1,' ');
  1107. X                    standend();
  1108. X                } else mvaddstr(lineno,0,line);
  1109. X                lineno++;
  1110. X                if(lineno>LINES-3) strcpy(line,"END");
  1111. X                else fgets(line,80,fp);
  1112. X            }
  1113. X            standout();
  1114. X            /* help screen 80 col format; constants needed */
  1115. X            mvaddstr(LINES-2,16,"HIT ANY KEY TO CONTINUE HELP SCREENS");
  1116. X            mvaddstr(LINES-1,21,"TO END HELP HIT SPACE KEY");
  1117. X            standend();
  1118. X            refresh();
  1119. X            if(getch()==' ') done=TRUE;
  1120. X        }
  1121. X    }
  1122. X    fclose(fp);
  1123. X}
  1124. X
  1125. Xvoid
  1126. Xnewspaper()
  1127. X{
  1128. X    int lineno;
  1129. X    FILE *fp, *fopen();
  1130. X    int newpage,choice,done=FALSE;
  1131. X    short pagenum=1;
  1132. X    int i,ydist,xdist;
  1133. X    char line[80],name[80];
  1134. X
  1135. X    /* check to make sure that there are newspapers */
  1136. X    if (TURN==0) {
  1137. X        clear_bottom(0);
  1138. X        errormsg("no news to read");
  1139. X        redraw=FALSE;
  1140. X        makebottom();
  1141. X        return;
  1142. X    }
  1143. X
  1144. X    clear_bottom(0);
  1145. X    ydist=LINES-3;
  1146. X    xdist=0;
  1147. X    /* check for all newspapers up until the current turn */
  1148. X    for (i=TURN-1;i>=0 && i>=TURN-MAXNEWS;i--) {
  1149. X        sprintf(line,"   %d) %s of Year %d",TURN-i,
  1150. X            PSEASON(i), YEAR(i));
  1151. X        /* align all strings */
  1152. X        mvprintw(ydist,xdist,"%s",line);
  1153. X        xdist += strlen(line);
  1154. X        if (xdist>60) {
  1155. X            xdist=0;
  1156. X            ydist++;
  1157. X        }
  1158. X    }
  1159. X    mvaddstr(LINES-4,0,"Read Which Newspaper:");
  1160. X    standend();
  1161. X    refresh();
  1162. X    /* get the choice */
  1163. X    choice = getch() - '0';
  1164. X    /* make sure the choice is valid */
  1165. X    if (choice<1 || choice > MAXNEWS) {
  1166. X        makebottom();
  1167. X        redraw=FALSE;
  1168. X        return;
  1169. X    }
  1170. X
  1171. X    sprintf(name,"%s%d",newsfile,TURN-choice);
  1172. X    if ((fp=fopen(name,"r"))==NULL) {
  1173. X        clear_bottom(0);
  1174. X        sprintf(line,"unable to open news file <%s>",name);
  1175. X        errormsg(line);
  1176. X        redraw=FALSE;
  1177. X        makebottom();
  1178. X        return;
  1179. X    }
  1180. X
  1181. X    /*open and read one page */
  1182. X    newpage=FALSE;
  1183. X    line[0]='\0';
  1184. X    strcpy(name,"");
  1185. X
  1186. X    /*clear out any proceeding blanks*/
  1187. X    while(done==FALSE && strlen(name)==0)
  1188. X        if(fgets(name,80,fp)==NULL) done=TRUE;
  1189. X
  1190. X    while(done==FALSE){
  1191. X        if(newpage==FALSE){
  1192. X            clear();
  1193. X            lineno=5;
  1194. X            newpage=TRUE;
  1195. X            standout();
  1196. X            mvprintw(0,23,"CONQUER NEWS REPORT  page %d",pagenum);
  1197. X            mvprintw(1,28,"%s of Year %d",PSEASON(TURN-choice),YEAR(TURN-choice));
  1198. X            mvprintw(3,37-strlen(name)/2,"%s",name+2);
  1199. X            standend();
  1200. X            /* display any pending non-blank lines */
  1201. X            if(strcmp(line,name)!=0 && strlen(line)>2)
  1202. X                mvaddstr(lineno++,0,line+2);
  1203. X        } else if(fgets(line,80,fp)==NULL) done=TRUE;
  1204. X        else {
  1205. X            if(line[1]!='.') {
  1206. X                strcpy(name,line);
  1207. X                newpage=FALSE;
  1208. X                pagenum++;
  1209. X            } else {
  1210. X                if(todigit(line[0])!=pagenum) {
  1211. X                    newpage=FALSE;
  1212. X                    pagenum=todigit(line[0]);
  1213. X                }
  1214. X                else if(lineno>LINES-4) newpage=FALSE;
  1215. X                else if(strlen(line)>2) mvaddstr(lineno++,0,line+2);
  1216. X            }
  1217. X        }
  1218. X        if(newpage==FALSE||done==TRUE){
  1219. X            standout();
  1220. X            /* constants since news is 80 col format */
  1221. X            mvaddstr(LINES-2,24,"HIT ANY KEY TO CONTINUE");
  1222. X            mvaddstr(LINES-1,25,"TO END NEWS HIT SPACE");
  1223. X            standend();
  1224. X            refresh();
  1225. X            if(getch()==' ') done=TRUE;
  1226. X        }
  1227. X    }
  1228. X    fclose(fp);
  1229. X}
  1230. END_OF_FILE
  1231. if test 26241 -ne `wc -c <'forms.c'`; then
  1232.     echo shar: \"'forms.c'\" unpacked with wrong size!
  1233. fi
  1234. # end of 'forms.c'
  1235. fi
  1236. if test -f 'header.h' -a "${1}" != "-c" ; then 
  1237.   echo shar: Will not clobber existing file \"'header.h'\"
  1238. else
  1239. echo shar: Extracting \"'header.h'\" \(8357 characters\)
  1240. sed "s/^X//" >'header.h' <<'END_OF_FILE'
  1241. X/* conquer : Copyright (c) 1988, 1989 by Ed Barlow.    
  1242. X
  1243. X   MODIFICATION OF THIS FILE IMPLIES THAT THE MODIFIER WILL ACCEPT
  1244. X    A LIMITED USE COPYRIGHT AS FOLLOWS:
  1245. X
  1246. X    1) This software is copyrighted and protected by law. The
  1247. X        sole owner of this software, which hereafter is known as
  1248. X        "conquer" is Edward M. Barlow, who hereby grants you a
  1249. X        personal, non-exclusive right to use this software.
  1250. X        All rights on this software are reserved.
  1251. X    2) conquer may not be redistributed in any form. Any requests for
  1252. X        new software shall, for now, be the perogative of the author.
  1253. X    3) loss or damage caused by this software shall not be
  1254. X        the responsibility of the author.
  1255. X    4) Ed Barlow shall be notified of enhancements to this software via
  1256. X        electronic mail and, if there is no response, via US mail to:
  1257. X
  1258. X            Ed Barlow
  1259. X            562 Clubhouse Dr,
  1260. X            Middletown NJ 07748
  1261. X
  1262. X        My home phone is 201-671-2896. Use it sparingly and call
  1263. X        before 11PM if it is important.
  1264. X    5) no attempt shall be made to make any money from this game or to
  1265. X        use any portion of this code to make any money without the
  1266. X        authors permission.
  1267. X    6) no attempt shall be made to port this software to any form of 
  1268. X        personal computer without the permission of Ed Barlow.
  1269. X    7) you agree to use your best efforts to see that any user
  1270. X        of conquer complies with the terms and conditions stated above.
  1271. X    8) The above copyright agreement will not be tampered with in any form.
  1272. X
  1273. X
  1274. X   Special thanks to Brian Beuning, Adam Bryant, and any others who helped
  1275. X    me by making enhancements and bug reports    
  1276. X*/
  1277. X
  1278. X/* --- MODIFICATION IS REQUIRED OF THE FOLLOWING DEFINE STATEMENTS ---    */
  1279. X#define OWNER    "Ed Barlow"    /* administrators name            */
  1280. X#define LOGIN    "smile"        /* administrators login id. IMPORTANT!    */
  1281. X                        /* only this UID may update.        */
  1282. X#define SYSV        /* uncomment this line on a UNIX SYSV machine    */
  1283. X/* #define BSD        /* uncomment this line on a BSD machine        */
  1284. X/* #define HPUX        /* uncomment for HP-UNIX            */
  1285. X/* #define SYSMAIL    /* if your system supports mail            */
  1286. X            /* conquer will notify you about system mail    */
  1287. X
  1288. X/* -------------------MODIFICATION IS OPTIONAL ON THE FOLLOWING-------------    */
  1289. X#define SPOOLDIR "/usr/spool/mail"    /* location of mail spool    */
  1290. X/* #define FILELOCK    /* if your system supports BSD flock()        */
  1291. X            /* other file locking is not well implemented    */
  1292. X
  1293. X#define NTOTAL 25    /* max # of nations ( player + npc + monster )    */
  1294. X#define MAXPTS    65    /* points for players to buy stuff with at start*/
  1295. X#define MAXARM    40    /* maximum number of armies per nation        */
  1296. X#define MAXNAVY    10    /* maximum number of fleets per nation        */
  1297. X#define PDEPLETE 30    /* % of armies/sectors depleted without Capitol    */
  1298. X#define PFINDSCOUT 50    /* percentage chance for capturing scouts    */
  1299. X
  1300. X#define RUNSTOP        /* defined to stop update if players are in    */
  1301. X            /* game -- not recommended with automatic update*/
  1302. X#define TRADE        /* defined to allow commerce between nations    */
  1303. X#define    TRADEPCT 75    /* percent of sectors with exotic trade goods    */
  1304. X#define METALPCT 33    /* percent of tradegoods that are metals    */
  1305. X#define JEWELPCT 33    /* percent of tradegoods that are luxury items    */
  1306. X#define HIDELOC        /* defined if news is not to report sectors    */
  1307. X
  1308. X#define OGOD        /* defined if you wish to enhance god powers.  This
  1309. X               should not be defined on the pc as there is no
  1310. X               /etc/passwd file to read info from        */
  1311. X
  1312. X#define DERVDESG    /* allow DERVISH to redesignate in a DESERT/ICE    */
  1313. X#define MONSTER    45    /* defined if pirates/barbarians/nomads/lzard exist.
  1314. X               represents # of sectors of land that need to be
  1315. X               in world per pirate/barbarian/nomad nation    */
  1316. X#define CHEAT        /* npcs will cheat to keep up - this is a very weak
  1317. X               form of cheating.  I use good npc algorithms 
  1318. X               (i think... comments)            */
  1319. X#define STORMS        /* have storms strike fleets            */
  1320. X#define VULCANIZE    /* add in volcano eruptions....            */
  1321. X#define PVULCAN 20    /* % chance of eruption each round (see above)    */
  1322. X#define ORCTAKE 100000L /* comment out if dont want orcs to takeover orc
  1323. X               NPCs.  else is takeover price in jewels    */
  1324. X#define MOVECOST 20l    /* cost to do a move, get a screen...        */
  1325. X#define TAKEPOINTS 10    /* spell points for orc takeover        */
  1326. X#define PMOUNT 40    /* % of land that is mountains            */
  1327. X#define PSTORM 3    /* % chance that a storm will strike a fleet    */
  1328. X            /* unless it is in harbor            */
  1329. X#define NPC        /* defined if non player country exists at start*/
  1330. X#define CMOVE        /* Defined if you wish the computer to move
  1331. X               for Player nations if they forget to move    */
  1332. X#define BEEP        /* defined if you wish terminal to beep        */
  1333. X#define HILIGHT        /* defined if terminals support inverse video    */
  1334. X#define RANEVENT 15    /* comment out if you dont want random events
  1335. X               weather, tax revolts, and volcanoes all are    
  1336. X               considered random events.             */
  1337. X#define PWEATHER 0    /* percent for weather disaster - unimplemented    */
  1338. X#define    PREVOLT    25    /* %/turn that a revolt acutally occurs        */
  1339. X            /* a turn is 1 season and 25% is a large value    */
  1340. X#define    SPEW        /* spew random messages from npcs         */
  1341. X
  1342. X/* ---BELOW THIS POINT ARE PARAMETERS YOU MIGHT OPTIONALLY WISH TO CHANGE---    */
  1343. X
  1344. X/* making these numbers large takes more CPU time            */
  1345. X#define LANDSEE 2    /* how far you can see from your land        */
  1346. X#define NAVYSEE 1    /* how far navies can see            */
  1347. X#define ARMYSEE 2    /* how far armies can see            */
  1348. X#define PRTZONE 3    /* how far pirates roam from their basecamp    */
  1349. X#define MEETNTN 2    /* how close nations must be to adjust status    */
  1350. X
  1351. X/* Below taxation rates are in gold talons per unit of product produced    */
  1352. X#define TAXFOOD        5L
  1353. X#define TAXMETAL    8L
  1354. X#define TAXGOLD        8L
  1355. X#define TAXOTHR        3L    /* per food point equivalent        */
  1356. X/* Town and City/Capitol tax rates based on # of people    */
  1357. X#define TAXCITY        100L
  1358. X#define TAXTOWN        80L
  1359. X
  1360. X#define SHIPMAINT    4000L    /* ship mainatinance cost        */
  1361. X#define TOMANYPEOPLE    4000L    /* too many people in sector - 1/2 repro and
  1362. X                   1/2 production; not in cities/caps    */
  1363. X#define ABSMAXPEOPLE    50000L    /* absolute max people in any sector    */
  1364. X#define    MILLSIZE    500L    /* min number of people to work a mill    */
  1365. X#define TOMUCHMINED    50000L    /* units mined for 100% chance of metal    */
  1366. X                /* depletion actual chance is prorated    */
  1367. X#define DESFOOD        4    /* min food val to redesignate sector    */
  1368. X#define MAXNEWS        5    /* number of news files stored        */
  1369. X#define LONGTRIP    100    /* navy trip lth for 100% attrition    */
  1370. X
  1371. X/* min soldiers to take sector - either 75 or based on your civilians    */
  1372. X#define TAKESECTOR    max(75,(ntn[country].tciv/350))
  1373. X
  1374. X#define MAXLOSS        60    /* maximum % of men lost in 1:1 battle    */
  1375. X#define    FINDPERCENT    1    /* percent to find gold/metal in sector    */
  1376. X#define DESCOST        2000L    /* cost to redesignate and the metal cost
  1377. X                   for cities                */
  1378. X#define FORTCOST    1000L    /* cost to build a fort point        */
  1379. X#define STOCKCOST    3000L    /* cost to build a stockade        */
  1380. X#define WARSHPCOST    20000L    /* cost to build one light warship    */
  1381. X#define MERSHPCOST    25000L    /* cost to build one light merchant    */
  1382. X#define GALSHPCOST    25000L    /* cost to build one light galley    */
  1383. X#define    SHIPCREW    100    /* full strength crew on a ship        */
  1384. X#define SHIPHOLD    100L    /* storage space of a ship unit        */
  1385. X#define CITYLIMIT    8L    /* % of npc pop in sctr before => city    */
  1386. X#define CITYPERCENT    20L    /* % of npc pop able to be in cities    */
  1387. X/* note that militia are not considered military below    */
  1388. X#define MILRATIO    8L    /* ratio civ:mil for NPCs        */
  1389. X#define MILINCAP    8L    /* ratio (mil in cap):mil for NPCs    */
  1390. X#define    MILINCITY    10L    /* militia=people/MILINCITY in city/cap */
  1391. X#define NPCTOOFAR    15    /* npcs should not go this far from cap    */
  1392. X#define BRIBE        50000L    /* amount of gold/1000 men to bribe    */
  1393. X#define METALORE    7L    /* metal/soldier needed for +1% weapons    */
  1394. X/* strength value for fortifications    */
  1395. X#define DEF_BASE    10    /* base defense value 2 * in city/caps    */
  1396. X#define FORTSTR        5    /* percent per fortress point in forts    */
  1397. X#define TOWNSTR        5    /* percent per fortress point in towns    */
  1398. X#define CITYSTR        8    /* percent per fortress point in city    */
  1399. X#define    LATESTART    2    /* new player gets 1 point/LATESTART turns, 
  1400. X                   when they start late into the game    */
  1401. X
  1402. X/*    starting values for mercenaries    */
  1403. X#define ST_MMEN     (NTOTAL*500)    /* a nation may draft ST_MMEN/NTOTAL    */
  1404. X                /* mercenaries per turn. Added to when    */
  1405. X                /* armies are disbanded.    */
  1406. X#define ST_MATT        40    /* mercenary attack bonus    */
  1407. X#define ST_MDEF        40    /* mercenary defense bonus    */
  1408. X
  1409. X#define VERSION "Version 4"    /* version number of the game    */
  1410. END_OF_FILE
  1411. if test 8357 -ne `wc -c <'header.h'`; then
  1412.     echo shar: \"'header.h'\" unpacked with wrong size!
  1413. fi
  1414. # end of 'header.h'
  1415. fi
  1416. if test -f 'txt0' -a "${1}" != "-c" ; then 
  1417.   echo shar: Will not clobber existing file \"'txt0'\"
  1418. else
  1419. echo shar: Extracting \"'txt0'\" \(8644 characters\)
  1420. sed "s/^X//" >'txt0' <<'END_OF_FILE'
  1421. X                       CONQUER COMMAND HELP SCREEN
  1422. X
  1423. X    MOVEMENT                 COMMANDS                    ADMINISTRATION
  1424. X'h': move west           'a': army report            'p': pick item
  1425. X'y': move north-west     'r': redesignate            'd': change display
  1426. X'k': move north          'w': cast spells/summon     'c': administration
  1427. X'u': move north-east     'm': move selected unit     '?': help screen
  1428. X'l': move east           'F': go to next fleet       's': score
  1429. X'n': move south-east     'f': fleet report           'B': budget status
  1430. X'j': move south          'Z': move people 2 Sectors  'P': production stats
  1431. X'b': move south-west     'S': diplomacy status       'N': read newspaper
  1432. X'J': scroll south        'Q': quit (saves changes)   'W': write message
  1433. X'K': scroll north        'M': magic                  'R': read messages
  1434. X'L': scroll east         'C': construct              'T': trade
  1435. X'H': scroll west         'D': draft                  't': transport via ship
  1436. X                         'G': go to next army        'v': version credits
  1437. X                         'g': group army report      'I': campaign information
  1438. X'ctrl-L': redraw                                     'ESC': extra commands 
  1439. XEND
  1440. X                      CONQUER EXTENDED COMMANDS
  1441. X
  1442. X   All of the extended commands are accessed by typing the ESC key and
  1443. Xthen one of the following extended command keys.
  1444. X
  1445. X   Each of the commands takes action on the currently selected army unit.
  1446. X
  1447. X                  'a': set army status to ATTACK
  1448. X                  'd': set army status to DEFEND
  1449. X                  's': set army status to SCOUT
  1450. X                  'm': set army status to MARCH
  1451. X                  'g': set army status to GARRISON
  1452. X                  'G': place army in a group with other armies
  1453. X                  'S': set army status to SEIGE or SORTIE
  1454. X                  'R': set army leader status to RULE
  1455. X                  '+': combine selected and next army
  1456. X                  '-': separate army into two units
  1457. X                  '/': separate army into two equal units
  1458. XEND
  1459. X                    Welcome to Conquer XVERSION
  1460. X
  1461. XCONQUER is a multi player computer game designed to run under the UNIX
  1462. Xoperating system.  In CONQUER,  each player is the leader of a nation,
  1463. Xcomposed of people (humans, orcs, elves, dwarves), resources, and land.
  1464. XRulers customize their nation at creation by chosing their race and by giving
  1465. Xtheir nation special powers (magic, combat factor, location, speed...)
  1466. Xand resources (civilians, troops, metal, gold...).  Play involves building,
  1467. Xmoving, and controlling armies and navies, diplomacy with other players,
  1468. Xand adjusting economic activity, which is primarily geared to the production
  1469. Xof gold for your treasury.  Metals are needed, however to build ships & armies,
  1470. Xand food is needed to prevent revolts and keep people alive.
  1471. X
  1472. XCommand line format: conquer [-hs -nNAT -dDIR]
  1473. X                -h       print this help text
  1474. X                -s       print out scores
  1475. X                -n NTN   run as nation NTN
  1476. X                -d DIR   run on data in directory DIR
  1477. XIt is suggested that each player set up a shell alias for their game & nation
  1478. XThe game administrator should read documentation on using the conqrun command.
  1479. XEND
  1480. X                       CONQUER CURSOR MOVEMENT
  1481. X
  1482. X                               NORTH
  1483. X
  1484. X                                (K)
  1485. X                          y,7   k,8   u,9
  1486. X                             \   |   /
  1487. X                               \ | /
  1488. X          WEST      (H) h,4 ---- 0 ---- l,6 (L)       EAST
  1489. X                               / | \
  1490. X                             /   |   \
  1491. X                          b,1   j,2   n,3
  1492. X                                (J)
  1493. X
  1494. X                               SOUTH
  1495. X
  1496. X               Figures in parenthesis indicate scrolling
  1497. X           Note either numeric keypad OR vi keys can be used
  1498. X
  1499. X                <cntrl>-L will redraw the screen
  1500. XEND
  1501. X                        CONQUER COMMANDS -- lower case commands
  1502. X
  1503. X'a': army report:    Gives an army's details & permits changing army status,
  1504. X                     merging 2 armies, splitting armies, and disbanding armies
  1505. X'c': administration: Report on nation status and then change name, password,
  1506. X                     add to combat bonus, or (if god) destroy a nation.
  1507. X'd': change display: Change display mode.  metal/jewel screens #'s are sector
  1508. X                     value.  Population screen #'s are the closest 100 people
  1509. X'f': fleet report:   Report on the status of your fleets.
  1510. X'g': group report:   As army report, but only show armies in current sector.
  1511. X'm': move unit:      move selected unit. The unit will stop when it runs out
  1512. X                     of move points or runs into an army larger than it.
  1513. X'p': pick item:      allows you to select the next army or navy in the
  1514. X                     sector.  Other commands will operate on that unit.
  1515. X'r': redesignate:    you can change habitable sectors you own to other
  1516. X                     designations.  Towns require 500+ people & Capitols
  1517. X                     require Towns.  God can redesignate anything.
  1518. X's': score:          print out a screen showing the scores
  1519. X't': transport:      load/unload soldiers or civilians onto selected fleet.
  1520. X'w': wizardry:       cast spells if you have the ability
  1521. X'?': help screen:    print out this help text
  1522. XEND
  1523. X                        CONQUER COMMANDS -- upper case commands pg. 1.
  1524. X
  1525. X'B': budget :      ESTIMATE your nations budget statistics
  1526. X'C': construct:    If you have cash, you can build fortifications and
  1527. X                   ships in your Towns.  Ships can only be built in Towns
  1528. X                   located on the water.
  1529. X'D': draft:        You may draft a 1/4 of the starting sector population if it
  1530. X                   was a Town/City/Cap and if you have the gold & metal. You
  1531. X                   must draft soldiers in multiples of 10 men.
  1532. X'F': next fleet:   Move cursor to your next fleet.
  1533. X'G': next army:    Move cursor to your next army.
  1534. X'I': information:  Display a screen containing general conquer statistics.
  1535. X'M': magic:        Prints your magic powers & offers you the option to
  1536. X                   purchase more (cost doubles each power). Monster Power
  1537. X                   gives you the chance to take over NPC nations.
  1538. XEND
  1539. X                        CONQUER COMMANDS -- upper case commands pg. 2.
  1540. X
  1541. X'N': newspaper:    Briefs you on world happenings.  Note: News has 4 pages.
  1542. X'P': production:   ESTIMATE your nations production statistics
  1543. X'S': diplomacy:    Allow you to see and alter your diplomatic status.
  1544. X'T': commerce:     Allow you to trade with other nations.
  1545. X'Q': quit:         Save your move and quit the game.  Note there is no
  1546. X                   means supported to quit without saving your moves.
  1547. X'R': read mail:    Read mail messages
  1548. X'W': write mail:   Write mail messages.  You can write to the administrator
  1549. X                   and can post articles to the news board with this command.
  1550. X'Z': move people:  Civilians can move between two of your sectors at a cost
  1551. X                   of 50 per civilian.  Civilians naturally move in the update.
  1552. XEND
  1553. X                       A TYPICAL FIRST TURN
  1554. X
  1555. XThis section is offered to help beginning players understand the first
  1556. Xturns of the game.  The objective at this point is to take land and to
  1557. Xmake enough farms that your people don't starve.  The first thing to do is
  1558. Xto look at sectors you can see (using the cursor keys).  You
  1559. Xare looking for sectors with high (4+) food/metal/jewel values.  You should
  1560. Xnow assign soldiers to army groups (via. the Escape / G sequence). An army
  1561. Xgroup id is the same as a leader id.  Then, pick an army or army group with
  1562. Xthe 'p'ick  command and 'm'ove it to a target sectors.  When you stop the
  1563. Xarmy, it should take the sector, and you should be able to see a little bit
  1564. Xmore of the world.  Every army should try to take a different sector each
  1565. Xof the first few turns.  'r'edesignate sectors to farms (f),mines (m), or
  1566. Xgoldmines ($).  Now browse the other reports and forms to get a feel of the
  1567. Xgame.  When done, quit via the 'q'uit command.  After the update,
  1568. Xcivilians will have moved into your sectors, and will start producing.
  1569. XWatch that food consumption early on!!!
  1570. XEND
  1571. X                            FINAL COMMENTS
  1572. X
  1573. XTo my knowledge Conquer runs well on UNIX (SYS V or BSD 4.3) systems.  The
  1574. Xgame treats turns like a hidden move wargame would...  you enter all your
  1575. Xmoves and the program and the program tells you what happens.  Like wargames, 
  1576. Xthere is no turning back.  Every move you make will be saved when you quit.
  1577. XIf you goof up real bad, you need to go to the administrator, and have him
  1578. Xlog in (as god) and fix whatever you did.  
  1579. X
  1580. XHave Fun
  1581. X
  1582. XThe Ed
  1583. XEND
  1584. XDONE
  1585. END_OF_FILE
  1586. if test 8644 -ne `wc -c <'txt0'`; then
  1587.     echo shar: \"'txt0'\" unpacked with wrong size!
  1588. fi
  1589. # end of 'txt0'
  1590. fi
  1591. echo shar: End of archive 13 \(of 14\).
  1592. cp /dev/null ark13isdone
  1593. MISSING=""
  1594. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ; do
  1595.     if test ! -f ark${I}isdone ; then
  1596.     MISSING="${MISSING} ${I}"
  1597.     fi
  1598. done
  1599. if test "${MISSING}" = "" ; then
  1600.     echo You have unpacked all 14 archives.
  1601.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1602. else
  1603.     echo You still need to unpack the following archives:
  1604.     echo "        " ${MISSING}
  1605. fi
  1606. ##  End of shell archive.
  1607. exit 0
  1608.